---
- name: terminate instance
  hosts: all
  user: root
  gather_facts: False

  tasks:
  - name: find the instance id from the builder
    action: command curl -s http://169.254.169.254/latest/meta-data/instance-id
    register: instanceid

  - name: terminate it
    local_action: command euca-terminate-instances {{ instanceid.stdout }}



